package main

import "fmt"

type Animal struct {
	name string
	age  int
}
type DOG struct {
	Animal
	color string
}

func (a2 Animal) eat() {
	fmt.Println("eat....")
}

func (a2 Animal) sleep() {
	fmt.Println("sleep....")
}

func main() {
	dog := DOG{
		Animal: Animal{name: "dog", age: 1},
		color:  "白色",
	}
	dog.eat()
	dog.sleep()
}
